﻿//-----------------------------------------------------------------------
// <copyright file="EventInfoEntity.cs" company="SLWY Enterprises">
// * Copyright (C) 2017 四川商旅无忧科技有限公司 版权所有。
// * version : 1.0
// * author  : qinchaoyue
// * FileName: EventInfoEntity.cs
// * history : created by qinchaoyue 2018-03-05 05:59:24
// </copyright>
//-----------------------------------------------------------------------
    
using System;
using Slwy.Data.Entity.Data;
using SqlSugar;

namespace Slwy.EventBus.Models
{
    /// <summary>
    /// 事件实体
    /// </summary>
    public class EventInfoEntity : EntityEdit<string>
    {
        /// <summary>
        /// 事件队列名称 (value: "slwy.default.router")
        /// </summary>
        public string RoutingKey { get; set; }

        /// <summary>
        /// 事件数据
        /// </summary>
        public string Data { get; set; }

        /// <summary>
        /// 延迟接受消息时间(单位:毫秒)
        /// </summary>
        public long DelayTime { get; set; }

        /// <summary>
        /// 回调类型
        /// </summary>
        public string CallBackType { get; set; }

        /// <summary>
        /// 事件有效日期
        /// </summary>
        public DateTime ValiDateTime { get; set; }

        /// <summary>
        /// 事件是否发送
        /// </summary>
        public bool IsPostd { get; set; }

        /// <summary>
        /// 事件发送日期
        /// </summary>
        public DateTime PostDateTime { get; set; }

        /// <summary>
        /// 发送失败信息
        /// </summary>
        public string ErrorMessage { get; set; } = string.Empty;

        /// <summary>
        /// 数据库连接字符串
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string ConnectionString { get; set; } = string.Empty;
    }
}
